package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlWsbaseMapper;
import com.ruoyi.sl.domain.SlWsbase;
import com.ruoyi.sl.service.ISlWsbaseService;

/**
 * 车间绩效系数Service业务层处理
 * 
 * @author admin
 * @date 2024-06-03
 */
@Service
public class SlWsbaseServiceImpl implements ISlWsbaseService 
{
    @Autowired
    private SlWsbaseMapper slWsbaseMapper;

    /**
     * 查询车间绩效系数
     * 
     * @param wsbaseId 车间绩效系数主键
     * @return 车间绩效系数
     */
    @Override
    public SlWsbase selectSlWsbaseByWsbaseId(Long wsbaseId)
    {
        return slWsbaseMapper.selectSlWsbaseByWsbaseId(wsbaseId);
    }

    /**
     * 查询车间绩效系数列表
     * 
     * @param slWsbase 车间绩效系数
     * @return 车间绩效系数
     */
    @Override
    public List<SlWsbase> selectSlWsbaseList(SlWsbase slWsbase)
    {
        return slWsbaseMapper.selectSlWsbaseList(slWsbase);
    }

    /**
     * 新增车间绩效系数
     * 
     * @param slWsbase 车间绩效系数
     * @return 结果
     */
    @Override
    public int insertSlWsbase(SlWsbase slWsbase)
    {
        slWsbase.setCreateTime(DateUtils.getNowDate());
        return slWsbaseMapper.insertSlWsbase(slWsbase);
    }

    /**
     * 修改车间绩效系数
     * 
     * @param slWsbase 车间绩效系数
     * @return 结果
     */
    @Override
    public int updateSlWsbase(SlWsbase slWsbase)
    {
        slWsbase.setUpdateTime(DateUtils.getNowDate());
        return slWsbaseMapper.updateSlWsbase(slWsbase);
    }

    /**
     * 批量删除车间绩效系数
     * 
     * @param wsbaseIds 需要删除的车间绩效系数主键
     * @return 结果
     */
    @Override
    public int deleteSlWsbaseByWsbaseIds(Long[] wsbaseIds)
    {
        return slWsbaseMapper.deleteSlWsbaseByWsbaseIds(wsbaseIds);
    }

    /**
     * 删除车间绩效系数信息
     * 
     * @param wsbaseId 车间绩效系数主键
     * @return 结果
     */
    @Override
    public int deleteSlWsbaseByWsbaseId(Long wsbaseId)
    {
        return slWsbaseMapper.deleteSlWsbaseByWsbaseId(wsbaseId);
    }
}
